#pragma once

#include <qbprotocol/include/SSQBModel.h>

#include <map>
#include <mutex>
#include <string>
#include <vector>

#include "bondlib.h"

class S_BONDLIB_EXPORT CMarketMakeTarget {
 public:
  static CMarketMakeTarget& instance();

  void ClearData();
  bool IsMarkertMakeTarget(int nIndex, const std::string& comBondCode);
  bool IsMarkertMakeTarget(const std::string& comBondCode);
  void UpdateData(xQBMarketMakeTargetAck_c* pData);

 private:
  CMarketMakeTarget();
  ~CMarketMakeTarget();

 protected:
  std::map<std::string, std::vector<std::string>> m_data;  // section_id, data
  std::map<int, std::vector<std::string>> m_IndexToSectionId;
  std::vector<std::string> m_vSectionId;
  std::mutex m_mutex;
};
